package service;

import java.util.ArrayList;

import dao.gradedao.GradeDao;
import dao.gradedao.GradeDaoImpl;
import model.GradeRecord;

public class queryGradeService {

	public int queryGrade(int work_id,String stu_id,String schoolyear) {
		GradeDao gradedao=new GradeDaoImpl();
		int grade=0;
		try {
			grade = gradedao.queryGrade(work_id,stu_id,schoolyear);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return grade;
	}

	public ArrayList<GradeRecord> queryAllGrade(String stu_id, String schoolyear) {
		 ArrayList<GradeRecord> recordlist=new  ArrayList<GradeRecord>();
		 GradeDao gradedao=new GradeDaoImpl();
		 try {
			recordlist=gradedao.queryAllGrade(stu_id, schoolyear);
		} catch (Exception e) {
			e.printStackTrace();
		}
		 return recordlist;
	}

}
